#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include "FreeRTOS.h"
#include "task.h"
#include "system_LPC17xx.h"
#include "GLCD.h"
#include "vtUtilities.h"
#include "LCDtask.h"
#include "string.h"
#include "math.h"
#include "lpc17xx_uart.h"
#include "lpc17xx_pinsel.h"
#include "lpc17xx_libcfg_default.h"
#include "Uart_Interrupt_g8.h"
#include "CommandThread.h"


// Define UART Packet Structure
struct UARTPacket
{
uint8_t value;												 
};

#define MAXDATASIZE 6

struct commMsg{
	
	unsigned char data[MAXDATASIZE];
	unsigned char size;
	unsigned char counter;
	unsigned char msgType;

}; 
struct commMsg * webCommMsg;
struct commMsg msg ;
extern uint8_t posY=6;
// initialize UART task

void Init_UART_Task();
void init_UART();
// writes the hex value of the packet to the buffer
void print_hex_packet(uint8_t *packet,uint16_t size,unsigned char *Buffer);
void send_start();
void send_stop();
void SendMsg(Comms_Msg_Struct* Msg);